package com.ruoyi.net.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.uuid.IdUtils;
import com.ruoyi.net.mapper.BusiMtnChannelSubclientMapper;
import com.ruoyi.net.domain.BusiMtnChannelSubclient;
import com.ruoyi.net.service.IBusiMtnChannelSubclientService;

/**
 * 业务-MTN Subclient(Fg client子表)Service业务层处理
 * 
 * @author spn
 * @date 2025-02-10
 */
@Service
public class BusiMtnChannelSubclientServiceImpl implements IBusiMtnChannelSubclientService 
{
    @Autowired
    private BusiMtnChannelSubclientMapper busiMtnChannelSubclientMapper;

    /**
     * 查询业务-MTN Subclient(Fg client子表)
     * 
     * @param id 业务-MTN Subclient(Fg client子表)主键
     * @return 业务-MTN Subclient(Fg client子表)
     */
    @Override
    public BusiMtnChannelSubclient selectBusiMtnChannelSubclientById(String id)
    {
        return busiMtnChannelSubclientMapper.selectBusiMtnChannelSubclientById(id);
    }

    /**
     * 查询业务-MTN Subclient(Fg client子表)列表
     * 
     * @param busiMtnChannelSubclient 业务-MTN Subclient(Fg client子表)
     * @return 业务-MTN Subclient(Fg client子表)
     */
    @Override
    public List<BusiMtnChannelSubclient> selectBusiMtnChannelSubclientList(BusiMtnChannelSubclient busiMtnChannelSubclient)
    {
        return busiMtnChannelSubclientMapper.selectBusiMtnChannelSubclientList(busiMtnChannelSubclient);
    }

    /**
     * 新增业务-MTN Subclient(Fg client子表)
     * 
     * @param busiMtnChannelSubclient 业务-MTN Subclient(Fg client子表)
     * @return 结果
     */
    @Override
    public int insertBusiMtnChannelSubclient(BusiMtnChannelSubclient busiMtnChannelSubclient)
    {
        String uuid = IdUtils.simpleUUID();
        if (StringUtils.isEmpty(busiMtnChannelSubclient.getId())) {
            busiMtnChannelSubclient.setId(uuid);
        }
        busiMtnChannelSubclient.setCreateBy(SecurityUtils.getUsername());
        busiMtnChannelSubclient.setCreateTime(DateUtils.getNowDate());
        busiMtnChannelSubclient.setUpdateBy(SecurityUtils.getUsername());
        busiMtnChannelSubclient.setUpdateTime(DateUtils.getNowDate());
        return busiMtnChannelSubclientMapper.insertBusiMtnChannelSubclient(busiMtnChannelSubclient);
    }

    /**
     * 修改业务-MTN Subclient(Fg client子表)
     * 
     * @param busiMtnChannelSubclient 业务-MTN Subclient(Fg client子表)
     * @return 结果
     */
    @Override
    public int updateBusiMtnChannelSubclient(BusiMtnChannelSubclient busiMtnChannelSubclient)
    {
        busiMtnChannelSubclient.setUpdateBy(SecurityUtils.getUsername());
        busiMtnChannelSubclient.setUpdateTime(DateUtils.getNowDate());
        return busiMtnChannelSubclientMapper.updateBusiMtnChannelSubclient(busiMtnChannelSubclient);
    }

    /**
     * 批量删除业务-MTN Subclient(Fg client子表)
     * 
     * @param ids 需要删除的业务-MTN Subclient(Fg client子表)主键
     * @return 结果
     */
    @Override
    public int deleteBusiMtnChannelSubclientByIds(String[] ids)
    {
        return busiMtnChannelSubclientMapper.deleteBusiMtnChannelSubclientByIds(ids);
    }

    /**
     * 删除业务-MTN Subclient(Fg client子表)信息
     * 
     * @param id 业务-MTN Subclient(Fg client子表)主键
     * @return 结果
     */
    @Override
    public int deleteBusiMtnChannelSubclientById(String id)
    {
        return busiMtnChannelSubclientMapper.deleteBusiMtnChannelSubclientById(id);
    }
}
